9. Flexbox Layout

I. Flex Container & Items

Explanation: Flexbox ek powerful layout tool hai jo container ke andar ke items ko horizontally ya vertically arrange karta hai.

Important: Parent ko display: flex dene se wo container ban jata hai aur uske andar ke elements "flex items".

II. Main Axis & Cross Axis

Explanation: Flexbox me 2 axis hote hain — Main Axis (direction of flex items) and Cross Axis (opposite direction).
flex-direction se hum main axis ko control karte hain.

III. Flex Properties

Common Properties:
justify-content → Horizontal alignment (main axis)
align-items → Vertical alignment (cross axis)
gap → Space between items

IV. Practical Layout Example

Example: Responsive Navigation Layout using Flexbox: